package a1;

import java.awt.Dimension;

public class Constants {
	public static final String WINDOW_TEXT = "Grayscale Colour Chooser";
	
	public static final String FILE_TEXT = "File";
	public static final String SETTINGS_TEXT = "Settings";
	public static final String COLOR_DISPLAY_TEXT = "Color Display Mode";
	public static final String GRAYSCALE_MODE_TEXT = "Grayscale Mode";
	public static final String HELP_TEXT = "Help";
	
	public static final String ADD_TEXT = "Add Colour";
	public static final String REMOVE_TEXT = "Remove Color";
	public static final String EXIT_TEXT = "Exit";
	public static final String ABOUT_TEXT = "About...";
	public static final String ABOUT_AUTHORS = "Authors:\n" +
												"Marco Cirillo, CSE93167, cirillom@yorku.ca\n" +
												"Erich Deetlefs, CSE93037, erich77@yorku.ca\n" +
												"Alitar Mehnagen CSE00000, mmsshh@yorku.ca";
	public static final String ABOUT_GRAYSCALE_MODES_TEXT = "About Grayscale Modes...";
	
	public static final String RGB_TEXT = "RGB (aaa, bbb, ccc)";
	public static final String HEX_TEXT = "HEX (#123456)";
	
	public static final String AVERAGE_TEXT = "Average";
	public static final String LIGHTNESS_TEXT = "Lightness";
	public static final String LUMINOSITY_TEXT = "Luminosity";
	
	
	public static final String OVERRIDE_TEXT = "Override Colour (unsafe)";
	
	public static final int RGB_MODE = 1;	// RGB Mode = (rrr, ggg, bbb)
	public static final int HEX_MODE = 2;	// HEX Mode = #ABCDEF 
	
	public static final int AVERAGE_MODE = 1;
	public static final int LIGHTNESS_MODE = 2;
	public static final int LUMINOSITY_MODE = 3;
	
	public static final String HSB_TEXT = "HSV";
	public static final String RGB_SLIDER_TEXT = "RGB";
	
	public static final String RED_TEXT = 	" Red:";
	public static final String GREEN_TEXT = " Green:";
	public static final String BLUE_TEXT = 	" Blue:";
	
	public static final int MIN_COLOR_VALUE = 0;
	public static final int MAX_COLOR_VALUE = 255;
	public static final int SPINNER_INCREMENT = 1;
	public static final int SLIDER_MAJOR_TICK_SPACING = 85;
	public static final int SLIDER_MINOR_TICK_SPACING = 17;
	
	// used by RGBSliderChooserPanel to have the GridLayout have distinct rows for 
	// Red, Green, and Blue sliders
	public static final int NUM_COLORS = 3;	
	public static final int NUM_COLORS_DISPLAYED = 2;		
	// used by the View to describe the maximum number of colours the user can select from
	public static final int MAX_COLOR_FIELDS = 10;

	public static final int MODE_LIGHTNESS = 1;
	public static final int MODE_AVERAGE = 2;
	public static final int MODE_LUMINOSITY = 3;

	public static final String COLOR_ONE = 		" Color 1: ";
	public static final String COLOR_TWO = 		" Color 2: ";
	public static final String COLOR_THREE =	" Color 3: ";
	public static final String COLOR_FOUR = 	" Color 4: ";
	public static final String COLOR_FIVE = 	" Color 5: ";
	public static final String COLOR_SIX = 		" Color 6: ";
	public static final String COLOR_SEVEN = 	" Color 7: ";
	public static final String COLOR_EIGHT = 	" Color 8: ";
	public static final String COLOR_NINE = 	" Color 9: ";
	public static final String COLOR_TEN = 		" Color 10: ";

	public static final String PREVIEW_TEXT = " Preview: ";
	
	public static final Dimension PREVIEW_PREFFERED_SIZE = new Dimension(200, 100);
	public static final Dimension SMALL_PREVIEW_PREFFERED_SIZE = new Dimension(20, 20);

	// gap for radio buttons. I wish there was a more scientific method of doing this 
	// rather than using a magic number. Could be a TODO
	public static final int RADIO_BUTTON_GAP = 15;
	
	// size for CSRB. I also wish there was a better way, but static sizing isn't
	// /that/ bad... is it?
	public static final int CSRB_WIDTH = 150;

	// When the program starts, we give the user 2 colors to work with,
	// as that is the minimum they would need to work with
	public static final int INITIAL_COLOR_CHOICES = 2;
	public static final int COLOR_PERCEPTION_DISTANCE = 15;
	// 255 / 10 = 25, so at our max amount of color choices, we want our colors to at least have
	// a difference of 25 between the grayscale (to discern #000000 from #010101)
	
	// PropertyChangeEvent Strings
	public static final String COLOR_UPDATE_EVENT = "ColorUpdateEvent";
	public static final String TEXT_UPDATE_EVENT = "TextUpdateEvent";
	public static final String ASK_FOCUS_EVENT = "AskFocusEvent";
	public static final String COLOR_PARSE_ERROR = "ColorParseError";
	public static final String TEXTFIELD_LOST_FOCUS_EVENT = "TextFieldLostFocus";
	public static final String PREVIEW_PANEL_UPDATE_EVENT = "PreviewPanelUpdateEvent";

	public static final String ILLEGAL_RADIO_BUTTON_STATE = "Current state of JRadioButton is illegal. This is caused when there are no currently selected JRadioButtons";
	public static final String ILLEGAL_GRAYSCALE_MODE = "A grayscale mode that does not exist was chosen, error in code.";
	public static final String ILLEGAL_COLOR_TITLE = "Invalid Color!";
	public static final String ILLEGAL_COLOR = "Color ranges from 0 to 255 for RGB or (exactly) 6 hexadecimal digits for HEX";
	public static final String ILLEGAL_COLOR_MODE = "Color mode can only be 1 (RGB) or 2 (HEX), please file a bug report.";
}
